#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

class TestClass
{
	int a;
public:
	TestClass(int x) { a = x; }
	void show() { cout << a; }
};

class TestClass1 :public TestClass
{
	int b;
public: 
	TestClass1(int i) :TestClass(i + 1), b(i){}
	void show() { cout << b; }
};

int main()
{
	TestClass b(5), * p;
	TestClass1 d(1);
	p = &d;
	p->show();

	return 0;
}